package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {

    /**
     * @description: 批量保存订单明细
     * @author: tanbobin
     * @date: 2024/6/6 15:34
     * @param:
     * @param orderDetailList
     * @return:
     **/
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * @description: 根据订单 id 查询订单详情(明细)
     * @author: tanbobin
     * @date: 2024/6/11 20:31
     * @param:
     * @param id
     * @return:
     * @return com.sky.entity.OrderDetail
     **/
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getDetailsById(Long id);
}
